package com.hwx.order_feign.feign.impl;

import com.alibaba.fastjson.JSONObject;
import com.hwx.order_feign.feign.ProductFeignClient;
import org.springframework.stereotype.Component;

/**
 * @Desc: 实现自定义的ProductFeginClient接口，在接口实现类中编写熔断降级方法
 * @Author: hwx
 * @Date: 2020/5/27 9:10
 * @Version: v1.0
 **/
@Component
public class ProductFeignClientFallBack implements ProductFeignClient {

	/**
	 * 熔断降级的方法
	 */
	@Override
	public JSONObject findById(Integer id) {
		JSONObject obj = new JSONObject();
		obj.put("msg","基于feign调用触发熔断降级");
		return obj;
	}

}
